﻿/*************************************************************************
* @filename : Form3.cs
* @function : 连接状态窗体代码
* @author   : Tuphie
* @version  : 1.00
* @date     : 2011-03-30
* @direction: 科院宽带系统登录客户端
**************************************************************************/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace netLog
{
    public partial class Form3 : Form
    {
        Form1 f;
        public Form3(Form1 f)
        {
            this.f = f;
            this.Owner = f;
            InitializeComponent();
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Closing += new CancelEventHandler(Form3_Closing);//重定义关闭按钮处理
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Hide();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Owner = f;
            f.logout();//调用主窗口中离线方法
            this.Close();
        }

        private void Form3_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            this.Hide();//隐藏Form窗体
            e.Cancel = true;//取消关闭Form窗口的操作
        }
    }
}
